"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.lastArg = exports.reverseArg = exports.firstArg = exports.deepCopy = exports.noop = exports.id = void 0;
const id = (e) => e;
exports.id = id;
function noop() { }
exports.noop = noop;
function deepCopy(o) {
    return JSON.parse(JSON.stringify(o));
}
exports.deepCopy = deepCopy;
function firstArg(fn) {
    return (v) => fn(v);
}
exports.firstArg = firstArg;
function reverseArg(fn) {
    return (...v) => fn([...v].reverse());
}
exports.reverseArg = reverseArg;
function lastArg(fn) {
    return (...v) => fn(v[v.length - 1]);
}
exports.lastArg = lastArg;
